<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class RechargeSetting extends Model
{
    use HasFactory;

    protected $table = 'sp_recharge_setting';
    protected $primaryKey = 'id';
    public $timestamps = false;

    const RECHARGE_TYPE_CONTRACT = 1;//合同
    const RECHARGE_TYPE_SMS = 2;//短信
    const RECHARGE_TYPE_RISKCREDIT = 3;//百融风控
    const RECHARGE_TYPE_RISKCREDIT_BOOLEA = 4;//布尔数据
    const RECHARGE_TYPE_RISKCREDIT_RADAR = 6;//雷达报告
    const RECHARGE_TYPE_RISKCREDIT_EDU = 7;//学历报告
    const RECHARGE_TYPE_RISKCREDIT_CRE = 8;//征信报告

    protected function GetOneRechargeSetting($where)
    {
        $data = $this
            ->where($where)
            ->first();
        $data = $data ? $data->toArray() : array();
        return $data;
    }

    //添加
    protected function addData($data)
    {
        return $data = $this->insert($data);
    }



}
